# -*- coding:utf-8 -*-
"""
@file: huiwen.py 
@time: 2019/07/05
@author: ljt
"""
str01 = "babccbab"


def slice_windoe (one_str, w=1):
	# 滑窗函数
	res_list = []
	for i in range(0, len(one_str) - w + 1):
		res_list.append(one_str[i:i + w])
	return res_list


# set().intersection()
def is_huiwne (str01):
	str02 = str01[::-1]
	intersection = []
	for i, str1 in enumerate(str01):
		if str01[i] == str02[i]:
			intersection.append(str01[i])
	if "".join(intersection) == str01:
		return True
	else:
		return False

print(is_huiwne("absba"))
print("finish")